﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Data;
using System.ComponentModel;
using System.Windows;
using SilverlightDebateViewModel.SilverlightDebateWS;
using System.Windows.Input;


namespace SilverlightDebateView.Classes
{
    public class NewOpinionVM : INotifyPropertyChanged, IPopup
    {
        public NewOpinionVM()
        {
            ObjOpinion = new SilverlightDebateViewModel.SilverlightDebateWS.Opinion();
        }

        #region Properties

        private SilverlightDebateViewModel.SilverlightDebateWS.Opinion _ObjOpinion;
        public SilverlightDebateViewModel.SilverlightDebateWS.Opinion ObjOpinion
        {
            get { return _ObjOpinion; }
            set
            {
                if (ObjOpinion == value)
                {
                    return;
                }
                _ObjOpinion = value;
                this.NotifyPropertyChanged("ObjOpinion");
            }
        }


        #endregion

        #region INotifyPropertyChanged
        public event PropertyChangedEventHandler PropertyChanged;

        private void NotifyPropertyChanged(String info)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(info));
            }
        }
        #endregion

        public bool? DialogResult { get; set; }
    }
}
